package com.pogita.cleancode.testprotectionjava.utils;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.springframework.security.core.token.Sha512DigestUtils;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public final class SignUtils {
    public static String getPaySign(String username, String password, long timestamp) {
        return new String(Sha512DigestUtils.sha(String.join("&", username, password, Long.toString(timestamp))));
    }
}